/**
 * Project Name:javaBaseReview
 * Package Name:com.xuwei.base.link
 * author:David
 * Date:2015年6月14日下午1:31:14
 * Copyright (c) 2015, xw123box@126.com All Rights Reserved.
 *
 */
package com.xuwei.base.graph;

import com.xuwei.base.link.Node;

/**
 * @author David
 * @since 2015年6月14日 下午1:31:14
 * @version 
 * @since JDK 1.6
 */
public class DLNode implements Node{
	private Object element;
	private DLNode pre;// 前驱
	private DLNode next;// 后继

	public DLNode(){
		this(null,null,null);
	}
	
	
	public DLNode(Object element, DLNode pre, DLNode next) {
		this.element=element;
		this.pre=pre;
		this.next=next;
	}

	
	public DLNode getPre() {
		return pre;
	}

	public void setPre(DLNode pre) {
		this.pre = pre;
	}

	public DLNode getNext() {
		return next;
	}

	public void setNext(DLNode next) {
		this.next = next;
	}

	/*************Node Interface Method******************/
	@Override
	public Object getData() {
		return element;
	}

	@Override
	public void setData(Object obj) {
		element=obj;
	}

}
